/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface M8ViewRoute extends BasicModel<M8ViewRoute> {
  code?: string; // 线路编号
  name?: string; // 线路名称
}

export const m8ViewRouteList = (params?: M8ViewRoute | any) =>
  defHttp.get<M8ViewRoute>({ url: adminPath + '/bas/route/m8ViewRoute/list', params });

export const m8ViewRouteListData = (params?: M8ViewRoute | any) =>
  defHttp.post<Page<M8ViewRoute>>({ url: adminPath + '/bas/route/m8ViewRoute/listData', params });

export const m8ViewRouteForm = (params?: M8ViewRoute | any) =>
  defHttp.get<M8ViewRoute>({ url: adminPath + '/bas/route/m8ViewRoute/form', params });

export const m8ViewRouteSave = (params?: any, data?: M8ViewRoute | any) =>
  defHttp.postJson<M8ViewRoute>({ url: adminPath + '/bas/route/m8ViewRoute/save', params, data });

export const m8ViewRouteDelete = (params?: M8ViewRoute | any) =>
  defHttp.get<M8ViewRoute>({ url: adminPath + '/bas/route/m8ViewRoute/delete', params });

export const m8ViewRouteTreeData = (params?: M8ViewRoute | any) =>
  defHttp.post<M8ViewRoute>({ url: adminPath + '/bas/route/m8ViewRoute/treeData', params });
